<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let obj = {
        name:"zs",
        age:18,
        sex:"男",
        say:function(){
            console.log(this); 
        },
        //简写
        play() {
            console.log(this); 
        }
        };
    obj.say(); 
    obj.play(); 
    // 1 Object.is() 判断两个值是否相等，返回布尔值
    console.log(Object.is(1,1)); //true
    console.log(Object.is(1,"1")); //false ===
    console.log(Object.is(NaN,NaN)); //true
    //2 Object.assign(目标对象，源对象，源对象.....) 合并对象，将源对象的属性合并到目标对象中，返回目标对象
    var obj1 = {
        a:1,
    }
    var obj2 = {
        b:2,
    }
    var obj3 = {
        c:3,
    }
    console.log(Object.assign(obj1,obj2)); //{a:1,b:2}
    console.log(obj1); //{a:1,b:2} 浅拷贝 只改变目标对象5
</script>
</html>